package org.platform.controller.knowledge;

import com.mc.mic.core.bo.CmdBO;
import com.mc.mic.core.bus.provider.BaseServiceRegister;
import org.platform.mo.csmo.cmd10009.TestGroupQueryRequestParam;
import org.platform.mo.csmo.cmd10009.TestGroupQueryResponseParam;
import org.platform.mo.csmo.cmd10010.TestGroupAddRequestParam;
import org.platform.mo.csmo.cmd10010.TestGroupAddResponseParam;
import org.platform.mo.csmo.cmd10011.TestGroupDelRequestParam;
import org.platform.mo.csmo.cmd10011.TestGroupDelResponseParam;
import org.platform.mo.csmo.cmd10012.TestGroupModifyRequestParam;
import org.platform.mo.csmo.cmd10012.TestGroupModifyResponseParam;
import org.platform.mo.csmo.cmd10013.QueryTestGroupRequestParam;
import org.platform.mo.csmo.cmd10013.QueryTestGroupResponseParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author FengJie
 * @date 2018/4/16
 */
@RestController
public class TestRegister extends BaseServiceRegister {
    /**
     * 查询测试模板集合（10009）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10009")
    public CmdBO getTestGroup(@RequestBody CmdBO<TestGroupQueryRequestParam, TestGroupQueryResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 增加测试模板（10010）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10010")
    public CmdBO addTestGroup(@RequestBody CmdBO<TestGroupAddRequestParam, TestGroupAddResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 删除测试模板（10011）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10011")
    public CmdBO delTestGroup(@RequestBody CmdBO<TestGroupDelRequestParam, TestGroupDelResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 修改测试模板（10013）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10012")
    public CmdBO modifyTestGroup(@RequestBody CmdBO<TestGroupModifyRequestParam, TestGroupModifyResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询测试模板集合（10013）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "10013")
    public CmdBO queryTestGroup(@RequestBody CmdBO<QueryTestGroupRequestParam, QueryTestGroupResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

}
